from typing import Mapping
import torch.nn as nn

class BasicNet(nn.Module):
  def __init__(self):
    super(BasicNet, self).__init__()
    self.net = nn.Linear(4, 3)

  def forward(self, x):
    return self.net(x)

class Net(nn.Module):
  def __init__(self):
    super(Net, self).__init__()
    self.net = nn.Sequential(BasicNet(),
                            nn.ReLU(),
                            nn.Linear(3, 2))
  
  def forward(self, x):
    return self.net(x)

if __name__ == "__main__":
  net = Net()
  print(net.named_parameters)
  print(net.modules)
  print(net.children)
